package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"warehouse/api/internal/config"
	"warehouse/houserpc/houserpcclient"
)

type ServiceContext struct {
	Config   config.Config
	HouseRpc houserpcclient.Houserpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		HouseRpc: houserpcclient.NewHouserpc(zrpc.MustNewClient(c.HouseRpc)),
	}
}
